
package framework.model;

import java.util.Iterator;
import java.util.ArrayList;

public class View<T> implements Iterable<T> {
    ArrayList<T> v;
    IPredicate<T> p; 
    public View(ArrayList<T> c, IPredicate<T> pred) {
        v = c;
        p = pred;
    }

    @Override
    public Iterator<T> iterator() {
        return new SelectiveIterator(v.iterator(), p);
    } 
}
